#!/bin/bash

source $DRAW_INI
source $DRAW_CFG

java -Xmx2g -jar $GENOMICS_JAR/CollectGcBiasMetrics.jar \
  VALIDATION_STRINGENCY=SILENT \
  REFERENCE_SEQUENCE=$REF_FASTA \
  TMP_DIR=$TMPDIR \
  INPUT=${1} \
  OUTPUT=Gc_Bias_Metrics \
  CHART_OUTPUT=${2} \
  SUMMARY_OUTPUT=sum_out_Gc 

EXITSTATUS=$?

if [ ! -s "${2}" ]; then exit 100;fi;

exit $EXITSTATUS

